package com.fruits.manage.common;

import java.util.Map;
import java.util.Set;

/**
 * EasyuiTree
 * 
 * @author yanghy
 * @date 2015-1-30 下午02:28:55
 * @version v1.0
 */
public class TreeModel {

	/** key */
	private String id;
	
	/** value */
	private String text;
	
	/** 是否打开open|closed */
	private String state = "closed";
	
	/** 是否选中 false|true */
	private Boolean checked = false;
	
	/** 图标 */
	private String iconCls = "icon-tip";
	
	/** 属性信息 */
	private Map<String, Object> attributes;
	
	/** 子节点 */
	private Set<TreeModel> childred;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Boolean getChecked() {
		return checked;
	}

	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	public String getIconCls() {
		return iconCls;
	}

	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public Map<String, Object> getAttributes() {
		return attributes;
	}

	public void setAttributes(Map<String, Object> attributes) {
		this.attributes = attributes;
	}

	public Set<TreeModel> getChildred() {
		return childred;
	}

	public void setChildred(Set<TreeModel> childred) {
		this.childred = childred;
	}

	public TreeModel() {}
	
	public TreeModel(String id, String text) {
		this.id = id;
		this.text = text;
	}

	public TreeModel(String id, String text, String state, Boolean checked, String iconCls,
			Map<String, Object> attributes, Set<TreeModel> childred) {
		super();
		this.id = id;
		this.text = text;
		this.state = state;
		this.checked = checked;
		this.iconCls = iconCls;
		this.attributes = attributes;
		this.childred = childred;
	}
	
}
